<?php

namespace App\Http\Controllers\Dashboard;


use App\Models\CityTicket;
use App\Models\LoanTypeList;
use App\Models\YqArea;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\DB;


class AppLoanTypeController extends BaseController
{
    /**
     * @param Request $request
     * @param $key
     * @return JsonResponse
     */



    public function getLoanType()
    {
        $LoanTypeList = LoanTypeList::get()->toArray();
        $Loan = [];
        foreach ($LoanTypeList as $k=>$v){
            $Loan[] =  $v['loan_type'];
        }
        return response()->json([
            'msg' => "ok",
            'code' => 0,
            'data' => $Loan,
        ]);
    }





}
